Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 12, 2025

Description

CS: remove class/function end comments

Includes removing the rule from the PHPCS native ruleset and adding another one to enforce the opposite, i.e. forbid end comments.

CS: remove blank line at end of functions

These made sense for readability with the noisy //end ... comments, but not without those... they really are not needed.

Includes removing the rule from the PHPCS native ruleset and adding another one to enforce the opposite, i.e. no blank line between function body and close curly.

Includes updating the comment format used for "required method which we don't use" comments in four sniffs to not run into "Empty line required after block comment" issues.

CS: remove blank lines at end of classes

Includes adjusting the rule from the PHPCS native ruleset to enforce no blank lines at the end of a class (well, no blank lines after the last function in an OO structure).

Suggested changelog entry

N/A

Related issues/external references

Part of a series of PRs to address #155

Includes removing the rule from the PHPCS native ruleset and adding another one to enforce the opposite, i.e. forbid end comments.
These made sense for readability with the noisy `//end ...` comments, but not without those... they really are not needed.

Includes removing the rule from the PHPCS native ruleset and adding another one to enforce the opposite, i.e. no blank line between function body and close curly.

Includes updating the comment format used for "required method which we don't use" comments in four sniffs to not run into "Empty line required after block comment" issues.
Includes adjusting the rule from the PHPCS native ruleset to enforce no blank lines at the end of a class (well, no blank lines after the last function in an OO structure).
@jrfnl jrfnl added this to the 4.0.0 milestone Sep 12, 2025
@jrfnl jrfnl merged commit 6e97cd2 into 4.x Sep 12, 2025
172 checks passed
@jrfnl jrfnl deleted the phpcs-4.x/feature/155-normalize-some-code-style-rules-5 branch September 12, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant